1. Field of the Invention
The present invention relates to a calibration pattern for an imaging device, particularly a calibration pattern for an imaging device to be shot, or captured, by an imaging device to correct measurement error of the imaging device.
2. Description of Related Art
Conventionally known imaging devices include an image measurer and an optical device, the image measurer measuring a length of an object based on a captured image thereof. Such an imaging device captures a predetermined calibration pattern to correct measurement error. The calibration pattern is a combination of an area of a light image (hereinafter referred to as a light area) and an area of a dark image (hereinafter referred to as a dark area) in capturing by an imaging device. The imaging device then detects an edge, which is a boundary of a light area and a dark area, and measures a distance between two edges having a known length (hereinafter referred to as a reference length) to correct measurement error. The two edges for measuring the length are called measurement edges hereinafter.
Such an imaging device sometimes has a zoom function to shoot an enlarged image of an object. In this case, the imaging device captures a plurality of calibration patterns in sizes according to zoom magnification to correct measurement error. The vision field of the imaging device changes depending on a device size of an imaging element and zoom magnification of the imaging device. With a small ratio of a distance between measurement edges relative to the vision field of the imaging device, the measurement error can not be sufficiently reduced due to aberration of a lens in the imaging device.
FIGS. 8(a) to 8(e) illustrate an example of conventional calibration patterns. In the drawings, a light area is represented by white and a dark area is represented by black (same applies to drawings hereinafter). In a calibration pattern PA, a square light area is placed at the central portion of the calibration pattern PA, and four dark areas having the same shape as the light area are placed above, below, left of, and right of the light area, as shown in FIG. 8(a), for example. An imaging device measures horizontal and vertical lengths of the light area in the calibration pattern PA as reference lengths Ax and Ay, respectively, and corrects measurement error. As shown in FIGS. 8(b) to 8(e), calibration patterns PB to PE are used in cases where the zoom magnification is reduced. The calibration patterns PB to PE are similar to the calibration pattern PA. The calibration patterns PB to PE have reference lengths Bx to Ex, respectively, and By to Ey, respectively.
FIGS. 9(a) and 9(b) illustrate a state of image processing to measure a horizontal length of a light area between dark areas. As shown in the upper figure of FIG. 9(a), an object W1 has a square light area in the middle and two dark areas having the same shape as the light area on the left and right thereof. The object W1 is captured by an imaging device to measure the horizontal length L1 of the light area of the object W1. In an image of the object W1, the light area and the dark areas spread out due to a lighting condition. It is deemed in the explanation below that the image Im1 of the object W1 includes the spreading light area, as shown in the lower figure of FIG. 9(a).
The horizontal gray value of the image Im1 suddenly changes outside the light area of the object W1, as shown in the upper figure of FIG. 9(b). Peaks of a differential curve obtained by differentiating the gray value are thus located outside of the light area of the object W1, as shown in the lower figure of FIG. 9(b). The distance between the peaks of the differential curve corresponding to the length L1 is measured as a distance between measurement edges of the length L1. Then, the measured value is a length M1, as shown in FIG. 9(a), thus causing measurement errors on both sides in opposite directions of the length L1, which is a true value. If the measurement error on one side is δ, the measurement errors on the both sides are +2δ.
FIGS. 10(a) and 10(b) illustrate a state of image processing to measure a horizontal length of a dark area between light areas. As shown in the upper figure of FIG. 10(a), an object W2 has a pattern in which light and dark areas are reversed from the object W1. The horizontal length L2 of the dark area of the object W2 is the same as the horizontal length L1 of the light area of the object W1. It is deemed in the explanation below that an image Im2 of the object W2 includes spreading light areas, as shown in the lower figure of FIG. 10(a), similar to the image Im1 of the object W1.
The horizontal gray value of the image Im2 suddenly changes inside the dark area of the object W2, as shown in the upper figure of FIG. 10(b). Peaks of a differential curve obtained by differentiating the gray value are thus located inside of the dark area of the object W2, as shown in the lower figure of FIG. 10(b). The distance between the peaks of the differential curve corresponding to the length L2 is measured as a distance between measurement edges of the length L2. Then, the measured value is a length M2, as shown in FIG. 10(a), thus causing measurement errors on both sides in opposite directions of the length L2, which is a true value. If the measurement error on one side is δ, the measurement errors on the both sides are −2δ.
As described above, in the case where the change direction of the gray value on one of the measurement edges increases while the change direction of the gray value on the other measurement edge decreases, in other words, in the case where the change directions are different on the measurement edges, a circumstance arises where a measurement error of ±2δ relative to the true value is observed due to a lighting condition. To address the circumstance, a calibration pattern is known in which change directions of measurement edges are identical to reduce measurement error relative to a true value (refer to Japanese Patent Laid-open Publication No. H8-170907, for example). A principle is explained below in which a measurement error relative to a true value is reduced with identical change directions of measurement edges.
FIGS. 11(a) and 11(b) illustrate a state of image processing in a case where change directions of measurement edges of an object are identical. As shown in the upper figure of FIG. 11(a), an object W3 has a pattern in which square light areas and dark areas are alternately provided in the horizontal direction. The object W3 is captured by an imaging device to measure a horizontal length L3 of the middle light area and dark area of the object W3. In an image of the object W3, the light and the dark areas spread out due to a lighting condition. It is deemed in the explanation below that the image Im3 of the object W3 includes the spreading light area, as shown in the lower figure of FIG. 11(a).
A horizontal gray value of the image Im3 suddenly changes outside the light areas of the object W3, as shown in the upper figure of FIG. 11(b). Peaks of a differential curve obtained by differentiating the gray value are thus located outside of the light areas of the object W3, as shown in the lower figure of FIG. 11(b). The distance between the peaks of the differential curve corresponding to the length L3 is measured as a distance between measurement edges of the length L3. Then, the measured value is a length M3, as shown in FIG. 11(a), thus causing measurement errors on both sides in an identical direction of the length L3, which is a true value. If the measurement error on one side is δ, the measurement errors on both sides are 0. With the measurement edges in identical change direction, the measurement error relative to the true value can be reduced even in the case affected by a lighting condition.
The calibration pattern disclosed in Japanese Patent Laid-open Publication No. H8-1709071 has a plurality of concentrically disposed measurement edges. With the calibration pattern of Japanese Patent Laid-open Publication No. H8-170907, the measurement error of an imaging device can thus be corrected without a change of a calibration pattern according to zoom magnification, unlike a conventional calibration pattern. Thereby, calibration time for an imaging device can be reduced. Furthermore, the calibration pattern of Japanese Patent Laid-open Publication No. H8-170907 allows correction of measurement error without positioning of an imaging device even if zoom magnification is changed. Thus, the central position of an image can be calibrated in the case where zoom magnification is changed.
However, even in the case where the calibration pattern of Japanese Patent Laid-open Publication No. H8-170907, which has the measurement edges in the identical change direction, is captured to correct measurement error, measurement error occurs in measurement of a measured object having measurement edges in different change directions. In the explanation below, the pattern of the object W1 to measure the length of a light area is referred to as a light area measurement pattern; the pattern of the object W2 to measure the length of a dark area is referred to as a dark area measurement pattern; and the pattern of the object W3 to measure the length of light and dark areas is referred to as a light/dark area measurement pattern. The light area measurement pattern and the dark area measurement pattern measure measurement edges in different change directions. The light/dark area measurement pattern measures measurement edges in the identical change direction.
FIG. 12 illustrates a relationship between a combination of a calibration pattern and a measured object and measurement error. A measured object having the light/dark area measurement pattern is captured in a case where a calibration pattern having the light/dark area measurement pattern is captured to correct measurement error. Then, the measurement error is 0, as shown in FIG. 12. In this case, however, measuring a measured object having the light area measurement pattern or the dark area measurement pattern results in a measurement error of ±δ.
A measured object having the light area measurement pattern is captured in a case where a calibration pattern having the light area measurement pattern is captured to correct measurement error. Then, the measurement error is 0. A measured object having the dark area measurement pattern is captured in a case where a calibration pattern having the dark area measurement pattern is captured to correct measurement error. Then, the measurement error is 0. Specifically, in the case where the calibration pattern and the measurement pattern of the measured object are the same, the measurement error is 0. It is thus desirable to select a measurement pattern for calibration according to a measurement pattern of a measured object.